package com.beamfield.dao.material;

import com.beamfield.model.Outbound;
import com.beamfield.modelVo.OutboundVo;
import com.beamfield.modelVo.SuppliesOutboundVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface OutboundMapper {
    int deleteByPrimaryKey(Long outbound_id);

    int insert(Outbound record);

    int insertSelective(Outbound record);

    Outbound selectByPrimaryKey(Long outbound_id);

    int updateByPrimaryKeySelective(Outbound record);

    int updateByPrimaryKey(Outbound record);

    double selectOutboundNum(@Param("issueId") String issueId, @Param("suppliesId") String suppliesId, @Param("purchasePlanId") String purchasePlanId, @Param("projectId") String projectId, @Param("projectDetailId") String projectDetailId, @Param("inboundId") Long inboundId);

    Outbound select(@Param("issueId") String issueId, @Param("projectId") String projectId, @Param("purchasePlanId") String purchasePlanId, @Param("suppliesId") String suppliesId,@Param("inboundId") Long inboundId);

    List<OutboundVo> readOuboundData(@Param("issueId") String issueId,
                                     @Param("projectId") String projectId,
                                     @Param("beamId")Long beamId,
                                     @Param("projectDetailId") String projectDetailId,
                                     @Param("suppliesId")  String suppliesId);

    double selectSumOutboundNum(@Param("suppliesIdList") List<String> suppliesIdList,@Param("beamId") long beamId);

    List<SuppliesOutboundVo> selectInNumAndOutNumBySupType(@Param("supType") String supType,@Param("beamId") long beamId);

    List<SuppliesOutboundVo> selectOutNumBySupTypeList(@Param("supTypeList") List<String> supTypeList,@Param("beamId") Long beamId);

    Double getOutboundSum(@Param("suppliesId")String suppliesId,@Param("beamId") Long beamId);

    Long selectCountByIssueId(String issueId);
}
